 
import request from '@/utils/request';

// 提交补偿单信息
export async function submitCompensation(data) {
  return request('/dp/sys/saveOrderInfo', {
    method: 'POST',
    data
  });
}

// 旅客列表数据
export async function getPassengerList(params) {
  return request('/dp/sys/getFlightPaxInfo', {
    method: 'get',
    params
  });
}

// 获取申领列表
export async function getApplyRecordInfo(params) {
  return request('/dp/sys/applyRecordInfo', {
    method: 'get',
    params,
  })
}

// 获取补偿次数表格数据
export async function getCompensationCount(params) {
  return request('/dp/sys/getPaxOrderInfo', {
    method: 'get',
    params,
  })
}

// 获取航段
export async function getSegment(params) {
  return request('/dp/sys/getSegment', {
    method: 'get',
    params,
  })
}

// 补偿单基本信息获取
export async function queryCompensationBaseInfo(params) {
  return request('/dp/sys/getFlightInfo', {
    method: 'get',
    params
  });
}

// 根据id 获取补偿单详细信息
export async function getCompensationDetail(params) {
  return request('/dp/sys/getDetailOrderInfoByOrderIdBaggage', {
    method: 'get',
    params,
  })
}

// 获取已选旅客和旅客维护数据
export async function getPassengerListData(params) {
  return request('/dp/sys/getPaxInfoByOrderId', {
    method: 'get',
    params,
  })
}

// 冻结 和 恢复旅客
export async function frozenPassenger(params) {
  return request('/dp/sys/updatePaxStatus', {
    method: 'post',
    params,
  })
}

// 获取部门树的数据
export async function getTreeData(params) {
  return request(`/department/getDepartment/${params}`, {
    method: 'get'
  })
}

// 根据用户名或工号查询用户
export async function getTreeUser (params) {;
  return request('/user/retrieveUsers', {
    method: 'get',
    params
  })
}

// 判断是否是AOC 人员
export async function isAocPerson (params) {;
  return request('/dp/sys/getIsAocByUserId', {
    method: 'get',
    params
  })
}

